package com.xinqi.modules.exam.common.assistant.enums;

import lombok.Getter;

/**
 * 消息类型 1, "互动课件"，2, "资料"，3, "作业"，4, "测评"，5, "讨论"，6, "互动视频"，8, "公告"，10, "考勤"，11, "随机提问"，12, "点名提问"
 *
 * @author linkai
 * @date 2023/7/15
 */
public enum MessageTypeEnum {
    测评(4, "测评"),
    ;

    @Getter
    private final int code;
    @Getter
    private final String description;

    MessageTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static MessageTypeEnum of(int code) {
        for (MessageTypeEnum value : MessageTypeEnum.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}
